// base-layout
.layout {
  display: flex;
  flex-direction: column;
  flex: auto;
  background: #f5f7f9;
  min-height: 100vh;
  &-has-aside {
    flex-direction: row;
    > .layout {
      overflow-x: hidden;
    }
  }
  &-aside {
    background: getMenuBg();
    transition: all .2s;
    position: relative;
    min-height: 100%;
    box-shadow: 2px 0 8px rgba(0, 21, 41, .08);
    &.fixed-aside {
      position: fixed;
      top: 0;
      left: 0;
      height: 100%;
      z-index: 12;
    }
    .logo {
      position: relative;
      width: 100%;
      height: 48px;
      overflow: hidden;
      padding-left: 14px;
      .icon {
        width: 36px;
      }
      h1 {
        font-size: 16px;
        margin: 0 0 0 8px;
        white-space: nowrap
      }
    }
    &-children {
      height: calc(100% - 48px);
      overflow: hidden;
    }
  }
  &-main {
    min-height: 100vh;
  }
  &-content-wrap {
    position: relative;
    flex: auto;
    min-height: 0;
    .table-wrap {
      display: flex;
      .table-right {
        width: calc(100% - 320px);
        padding-left: 16px;
      }
    }
  }
}

// header
.layout-header {
  transition: width .2s;
  flex: 0 0 auto;
  &.fixed-header {
    position: fixed;
    top: 0;
    transition: width .2s;
    z-index: 5;
  }
  .global-header {
    display: flex;
    height: 48px;
    padding: 0;
    background-color: #fff;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    &.has-border {
      border-bottom: 1px solid #eee;
    }
    &-left {
      display: flex;
      align-items: center;
      .global-header-trigger i {
        position: relative;
      }
      .header-breadcrumb {
        padding: 0 6px;
      }
    }
    &-right {
      display: flex;
    }
    &-trigger {
      display: flex;
      height: 48px;
      padding: 0 10px;
      cursor: pointer;
      align-items: center;
      transition: background-color .2s;
      .b-iconfont {
        vertical-align: -.125em;
        font-size: 18px;
        height: 18px;
        color: $color-text-default;
        line-height: 1;
      }
      &:hover {
        background-color: #f6f6f6;
        .b-iconfont {
          color: $color-text-primary;
        }
      }
      &.light {
        &:hover {
          background-color: #f6f6f6;
        }
      }
    }
    &-avatar-trigger {
      display: flex;
      align-items: center;
      height: 48px;
      padding: 0 10px;
      cursor: pointer;
      outline: none;
      transition: background-color .2s;
      .avatar {
        width: 24px;
        border-radius: 50%;
        margin-right: 10px;
      }
      &:hover {
        background-color: #f6f6f6;
      }
    }
  }
}

// tags-view
.tags-view-container {
  position: relative;
  display: flex;
  height: 32px;
  box-sizing: content-box;
  background-color: #ffffff;
  .bin-tabs-wrapper {
    margin: 0 8px;
    width: calc(100% - 96px);
    .nav-wrapper {
      height: 32px;
      .tab-list {
        margin-top: 4px;
      }
      .tab-item {
        height: 24px;
        line-height: 24px;
        margin-right: 5px;
        font-size: 12px;
        color: #808695;
        padding: 0 10px;
        &::before {
          content: unset;
        }
        &:hover {
          color: getColor();
        }
        .b-icon-close {
          right: -4px;
          margin-left: 0;
        }
        &.active {
          background: getColor();
          border-color: getColor();
          color: #ffffff !important;
          .b-icon-close {
            width: 14px;
            color: #ffffff;
          }
          .b-icon-close:hover {
            color: #dddbdb;
          }
        }
      }
      .nav-prev, .nav-next {
        line-height: 32px;
      }
    }
    .contextmenu li {
      display: flex;
      align-items: center;
      i {
        margin-right: 4px;
      }
    }
  }
  .tags-view-ctrl {
    width: 96px;
    display: flex;
    .trigger {
      width: 32px;
      line-height: 32px;
      color: $color-text-secondary;
      text-align: center;
      cursor: pointer;
      border-left: 1px solid #eee;
      i {
        position: relative;
        font-size: 16px;
        top: -1px;
      }
      &:hover i {
        color: $color-text-primary;
      }
    }
  }
  &:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    bottom: 0;
    background-color: #eee;
  }
}
// menu
.aside-menu {
  height: 100%;
  .bin-scrollbar__wrap {
    overflow-x: hidden;
  }
}
// menu-popup
.bin-menu--popup {
  z-index: 100;
  min-width: 180px;
  border: none;
  padding: 4px 0;
  .bin-menu-item, .bin-submenu__title {
    height: 40px;
    line-height: 40px;
  }
}
